package com.migration.model.olddb;

import jakarta.persistence.*;
import lombok.Data;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * 后果信息表 实体类
 * 表名：ra_consequence
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "ra_consequence")
public class RaConsequence implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 主键
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    private Long id;
    
    /**
     * 节点主键
     */
    @Column(name = "node_id")
    private Long nodeId;
    
    /**
     * 后果编码
     */
    @Column(name = "effect_code", length = 16)
    private String effectCode;
    
    /**
     * 后果描述
     */
    @Column(name = "effect_desc", nullable = false, length = 128)
    private String effectDesc;
    
    /**
     * 后果类型
     */
    @Column(name = "effect_type")
    private Byte effectType;
    
    /**
     * 严重性主键
     */
    @Column(name = "severity_grade_id")
    private Long severityGradeId;
    
    /**
     * 严重性等级
     */
    @Column(name = "severity_grade", length = 16)
    private String severityGrade;
    
    /**
     * 物料主键ID，多个逗号分隔
     */
    @Column(name = "chemicals_ids", length = 512)
    private String chemicalsIds;
    
    /**
     * 修正值
     */
    @Column(name = "corrected_val", length = 16)
    private String correctedVal;
    
    /**
     * 防护措施总数
     * 默认值: 0
     */
    @Column(name = "defend_count")
    private Integer defendCount;
    
    /**
     * 租户主键ID
     * 默认值: 1
     */
    @Column(name = "tenant_id")
    private Integer tenantId;
    
    /**
     * 是否删除（0、否 1、是）
     * 默认值: 0
     */
    @Column(name = "is_del", nullable = false)
    private Byte isDel;
    
    /**
     * 创建时间
     * 默认值: CURRENT_TIMESTAMP
     */
    @Column(name = "create_time", nullable = false)
    private java.time.LocalDateTime createTime;
    
    @Override
    public String toString() {
        return "RaConsequence{" +
            "id=" + id +
            ", nodeId=" + nodeId +
            ", effectCode=" + effectCode +
            ", effectDesc=" + effectDesc +
            ", effectType=" + effectType +
            ", severityGradeId=" + severityGradeId +
            ", severityGrade=" + severityGrade +
            ", chemicalsIds=" + chemicalsIds +
            ", correctedVal=" + correctedVal +
            ", defendCount=" + defendCount +
            ", tenantId=" + tenantId +
            ", isDel=" + isDel +
            ", createTime=" + createTime +
        '}';
    }
} 